import { getarea } from '@/utils/http.js'
export default {
	namespaced: true,
	state: {
		city: [],
		country: [],
		province: []
	},
	getters: { 
	},
	mutations: {
		setArea(state, data) {
			const { city, country, province } = data
			state.city = city
			state.country = country
			state.province = province
		}
	},
	actions: {
		reloadArea({ commit }) {
			getarea().then(res => { 
				 commit('setArea',res)
			})
		},
	}
}